﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using S4Store.Domain;
using S4Store.Domain.FinancialKpi;
using S4Store.Domain.ExhibitionKpi;

namespace S4Store.Models.ExhibitionKpi
{
    public class InputFinancialKpiDayDataModel
    {
        public List<ExhibitionWeekData> DayDatas { get; set; }
        public DateTime Month { get; set; }
        public List<ExhibitionMonthConfig> ExhibitionMonthConfigs { get; set; }

        public ExhibitionWeekData GetDayData(int weekindex)
        {
            var data = DayDatas.FirstOrDefault(t => t.WeekIndex == weekindex);
            if (data == null)
            {
                data = new ExhibitionWeekData();
                data.Month = Month;
                data.WeekIndex = weekindex;
            }
            return data;
        }

        public bool IsConfirmed { get; set; }
    }
}